
package com.gome.gop.common;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.StringUtils;

/**
 * @ClassName: LmisIneterfaceCodeEnum
 * @Description: lmis接口编号枚举
 * @author chengcheng 1294480405@qq.com
 * @date 2018年4月12日 上午10:53:29
 */
public enum LmisIneterfaceCodeEnum {
	// 开放拉口平台，订单下发
    OPEN_PLATFORM_TRIGGER_OMS("OP001"),
    // GOP页面实时库存查询查询接口
    OPEN_PLATFORM_NOWINVENTORY("OP002"),
    //订单状态查询
    OPEN_PLATFORM_ORDER_STATE("OP003"),
    // 开放拉口平台，取消订单
    OPEN_PLATFORM_CANCEL_ORDER("OP005"),
    //GOP页面在库串码查询接口
    OPEN_PLATFORM_STRCODEQUERY("OP010"),
    //GOP页面出库串码查询接口
    OPEN_PLATFORM_DELIVERYSTRCODEQUERY("OP011"),
    //历史库存查询接口
    OPEN_PLATFORM_HISTORYINVENTORY("OP013"),
    //在库可卖数接口
    OPEN_PLATFORM_VENDIBILITY("OP024"),
    //共享库存更新接口
    OPEN_PLATFORM_SHARE_UPDATE("OP033"),
    //库存手动同步
    OPEN_PLATFORM_INVENTORY_UPDATE("OP037"),
    
    //lmis中sku效验
    OPEN_PLATFORM_SKU_FIND("OP044"),
    //lmis中sku四级品类同步
    OPEN_PLATFORM_SKU_CATEGORY("OP045"),
    //lmis中sku审核
    OPEN_PLATFORM_SKU_AUDIT("OP046"),
    
    //路由回复接口
    OPEN_PLATFORM_ROUTEREPLY("OP014"),
    OPEN_PLATFORM_TRIGGER_OMS_synchronous("OP017"),//触发接口 同步
    OPEN_PLATFORM_STRCODE("XLMIS001")
    //安装单
    ,INSTALL_TASK_LMIS("OP038")
    //安装单取消
    ,INSTALL_TASK_CANCEL_LMIS("OP040")
    ;
    
    public static List<String> getNameList() {
        LmisIneterfaceCodeEnum[] documentTypes = LmisIneterfaceCodeEnum.values();
        List<String> list = new ArrayList<String>();
        for (LmisIneterfaceCodeEnum documentType : documentTypes) {
            list.add(documentType.toString().toUpperCase());
        }
        return list;
    }
    
    public static List<String> getValueList() {
        LmisIneterfaceCodeEnum[] documentTypes = LmisIneterfaceCodeEnum.values();
        List<String> list = new ArrayList<String>();
        for (LmisIneterfaceCodeEnum documentType : documentTypes) {
            list.add(documentType.getValue().toString().toUpperCase());
        }
        return list;
    }
    
    private String value;
    
    private LmisIneterfaceCodeEnum(String value) {
        this.value = value;
    }
    
    public String getValue() {
        return value;
    }
    
    public void setValue(String value) {
        this.value = value;
    }
    
    public static LmisIneterfaceCodeEnum getEnumByvalue(String value) {
        for (LmisIneterfaceCodeEnum userAccountEnum : LmisIneterfaceCodeEnum.values()) {
            if (StringUtils.equals(value, userAccountEnum.getValue())) {
                return userAccountEnum;
            }
        }
        return null;
    }
    
    public static void main(String[] args) {
        // System.out.println(CodeTypeEnum.is3c.getValue());
    }
}
